package com.ktjy.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ktjy.mapper.DevUserMapper;
import com.ktjy.pojo.DevUser;
import com.ktjy.service.DevUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 15423
* @description 针对表【dev_user】的数据库操作Service实现
* @createDate 2024-05-13 17:04:38
*/
@Service
public class DevUserServiceImpl extends ServiceImpl<DevUserMapper, DevUser> implements DevUserService {

    @Autowired
    public DevUserMapper devUserMapper;

    /**
     * 登录
     * @param devCode
     * @param devPassword
     * @return
     */
    @Override
    public DevUser devlogin(String devCode, String devPassword) {
        return devUserMapper.selectOne(new QueryWrapper<DevUser>().eq("devcode",devCode).eq("devpassword",devPassword));
    }




    public void Insert(String devCode, String devPassword,Long id){
        DevUser devUser=new DevUser();
        devUser.setDevcode(devCode);
        devUser.setDevpassword(devPassword);
        devUser.setId(id);
        devUserMapper.insert(devUser);
    }
}




